#include <cstdio>

const int N = 1e4 + 5;
int n, cnt, pri[N];
bool vis[N];

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("testdata.in", "r", stdin);
  freopen("testdata.out", "w", stdout);
#else
  freopen("UVA1521 GCD Guessing Game.in", "r", stdin);
  freopen("UVA1521 GCD Guessing Game.out", "w", stdout);
#endif
#endif

  for (int i = 2; i < N; ++i) {
    if (!vis[i]) { pri[++cnt] = i; }
    for (int j = 1; j <= cnt && pri[j] * i < N; ++j) {
      vis[pri[j] * i] = true;
      if (i % pri[j] == 0) break;
    }
  }
  while (scanf("%d", &n) != EOF) {
    int ans = 0, ptr = cnt, l = 1;
    while (pri[ptr] > n) --ptr;
    for (int tmp; l <= ptr; --ptr, ++ans) {
      tmp = pri[ptr];
      while (pri[l] * tmp <= n) tmp *= pri[l++];
    }
    printf("%d\n", ans);
  }
  return 0;
}